"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
var vue_1 = require("vue");
var element_plus_1 = require("element-plus");
var icons_vue_1 = require("@element-plus/icons-vue");
// 分类切换
var handleCategoryChange = function (index) {
    console.log('切换到分类：', index);
    // 切换分类时重置分页并加载对应数据
    pagination.currentPage = 1;
    fetchMessageList(index);
};
// 刷新消息列表
var handleRefresh = function () {
    element_plus_1.ElMessage.success('消息已刷新');
    fetchMessageList(currentCategory.value);
};
// 选择消息
var selectedMessages = (0, vue_1.ref)([]);
var handleSelectionChange = function (val) {
    selectedMessages.value = val;
};
// 分页数据
var pagination = (0, vue_1.reactive)({
    currentPage: 1,
    pageSize: 10,
    total: 0
});
// 当前选中分类
var currentCategory = (0, vue_1.ref)('all');
// 消息列表数据
var messageList = (0, vue_1.ref)([]);
// 模拟消息数据
var mockMessages = {
    all: [
        {
            id: '1',
            title: '系统升级通知',
            tagType: 'system',
            tagText: '系统通知',
            content: '您好，系统将于今晚23:00进行升级维护，预计持续2小时，期间可能无法正常使用，敬请谅解',
            hasAttachment: false,
            time: '2023-10-15 09:30:22'
        },
        {
            id: '2',
            title: '您的款项已到账',
            tagType: 'finance',
            tagText: '打款通知',
            content: '您的订单#20231015001款项已到账，金额：¥12,500.00，请查收',
            hasAttachment: true,
            time: '2023-10-15 14:25:10'
        },
        {
            id: '3',
            title: '下午会议提醒',
            tagType: 'afternoon',
            tagText: '下午通知',
            content: '今天下午15:00将召开月度总结会议，请准时参加，会议地点：3楼会议室',
            hasAttachment: false,
            time: '2023-10-15 13:10:05'
        },
        {
            id: '4',
            title: '新功能上线通知',
            tagType: 'operation',
            tagText: '运营通知',
            content: '平台新功能"数据分析"已上线，您可以在控制台查看详细数据报表',
            hasAttachment: false,
            time: '2023-10-14 16:45:30'
        },
        {
            id: '5',
            title: '发票已开具',
            tagType: 'finance',
            tagText: '打款通知',
            content: '您申请的发票已开具，发票号码：00123456，已邮寄至您的地址',
            hasAttachment: true,
            time: '2023-10-14 10:20:18'
        }
    ],
    system: [ /* 系统通知数据子集 */],
    finance: [ /* 财务通知数据子集 */],
    operation: [ /* 运营通知数据子集 */]
};
// 初始化时加载全部消息
(0, vue_1.onMounted)(function () {
    fetchMessageList('all');
});
// 获取消息列表
var fetchMessageList = function (category) {
    // 模拟接口请求
    setTimeout(function () {
        // 实际项目中根据分类请求不同数据
        messageList.value = mockMessages[category] || mockMessages.all;
        pagination.total = messageList.value.length;
    }, 300);
};
// 分页大小改变
var handleSizeChange = function (val) {
    pagination.pageSize = val;
};
// 当前页改变
var handleCurrentChange = function (val) {
    pagination.currentPage = val;
};
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
var __VLS_ctx = __assign(__assign({}, {}), {});
var __VLS_elements;
var __VLS_components;
var __VLS_directives;
/** @type {__VLS_StyleScopedClasses['el-badge__content']} */ ;
/** @type {__VLS_StyleScopedClasses['el-badge__content']} */ ;
/** @type {__VLS_StyleScopedClasses['el-badge__content']} */ ;
/** @type {__VLS_StyleScopedClasses['content-header']} */ ;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "notification-page" }));
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "container" }));
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "sidebar" }));
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "sidebar-title" }));
var __VLS_0 = {}.ElMenu;
/** @type {[typeof __VLS_components.ElMenu, typeof __VLS_components.elMenu, typeof __VLS_components.ElMenu, typeof __VLS_components.elMenu, ]} */ ;
// @ts-ignore
ElMenu;
// @ts-ignore
var __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0(__assign(__assign({ 'onSelect': {} }, { defaultActive: "all" }), { class: "notification-menu" })));
var __VLS_2 = __VLS_1.apply(void 0, __spreadArray([__assign(__assign({ 'onSelect': {} }, { defaultActive: "all" }), { class: "notification-menu" })], __VLS_functionalComponentArgsRest(__VLS_1), false));
var __VLS_4;
var __VLS_5;
var __VLS_6 = ({ select: {} },
    { onSelect: (__VLS_ctx.handleCategoryChange) });
var __VLS_7 = __VLS_3.slots.default;
// @ts-ignore
[handleCategoryChange,];
var __VLS_8 = {}.ElMenuItem;
/** @type {[typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, ]} */ ;
// @ts-ignore
ElMenuItem;
// @ts-ignore
var __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8({
    index: "all",
}));
var __VLS_10 = __VLS_9.apply(void 0, __spreadArray([{
        index: "all",
    }], __VLS_functionalComponentArgsRest(__VLS_9), false));
var __VLS_12 = __VLS_11.slots.default;
var __VLS_13 = {}.ElBadge;
/** @type {[typeof __VLS_components.ElBadge, typeof __VLS_components.elBadge, ]} */ ;
// @ts-ignore
ElBadge;
// @ts-ignore
var __VLS_14 = __VLS_asFunctionalComponent(__VLS_13, new __VLS_13(__assign({ value: (12) }, { class: "badge-all" })));
var __VLS_15 = __VLS_14.apply(void 0, __spreadArray([__assign({ value: (12) }, { class: "badge-all" })], __VLS_functionalComponentArgsRest(__VLS_14), false));
var __VLS_11;
var __VLS_18 = {}.ElMenuItem;
/** @type {[typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, ]} */ ;
// @ts-ignore
ElMenuItem;
// @ts-ignore
var __VLS_19 = __VLS_asFunctionalComponent(__VLS_18, new __VLS_18({
    index: "system",
}));
var __VLS_20 = __VLS_19.apply(void 0, __spreadArray([{
        index: "system",
    }], __VLS_functionalComponentArgsRest(__VLS_19), false));
var __VLS_22 = __VLS_21.slots.default;
var __VLS_23 = {}.ElBadge;
/** @type {[typeof __VLS_components.ElBadge, typeof __VLS_components.elBadge, ]} */ ;
// @ts-ignore
ElBadge;
// @ts-ignore
var __VLS_24 = __VLS_asFunctionalComponent(__VLS_23, new __VLS_23(__assign({ value: (5) }, { class: "badge-system" })));
var __VLS_25 = __VLS_24.apply(void 0, __spreadArray([__assign({ value: (5) }, { class: "badge-system" })], __VLS_functionalComponentArgsRest(__VLS_24), false));
var __VLS_21;
var __VLS_28 = {}.ElMenuItem;
/** @type {[typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, ]} */ ;
// @ts-ignore
ElMenuItem;
// @ts-ignore
var __VLS_29 = __VLS_asFunctionalComponent(__VLS_28, new __VLS_28({
    index: "finance",
}));
var __VLS_30 = __VLS_29.apply(void 0, __spreadArray([{
        index: "finance",
    }], __VLS_functionalComponentArgsRest(__VLS_29), false));
var __VLS_32 = __VLS_31.slots.default;
var __VLS_33 = {}.ElBadge;
/** @type {[typeof __VLS_components.ElBadge, typeof __VLS_components.elBadge, ]} */ ;
// @ts-ignore
ElBadge;
// @ts-ignore
var __VLS_34 = __VLS_asFunctionalComponent(__VLS_33, new __VLS_33(__assign({ value: (3) }, { class: "badge-finance" })));
var __VLS_35 = __VLS_34.apply(void 0, __spreadArray([__assign({ value: (3) }, { class: "badge-finance" })], __VLS_functionalComponentArgsRest(__VLS_34), false));
var __VLS_31;
var __VLS_38 = {}.ElMenuItem;
/** @type {[typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, ]} */ ;
// @ts-ignore
ElMenuItem;
// @ts-ignore
var __VLS_39 = __VLS_asFunctionalComponent(__VLS_38, new __VLS_38({
    index: "operation",
}));
var __VLS_40 = __VLS_39.apply(void 0, __spreadArray([{
        index: "operation",
    }], __VLS_functionalComponentArgsRest(__VLS_39), false));
var __VLS_42 = __VLS_41.slots.default;
var __VLS_43 = {}.ElBadge;
/** @type {[typeof __VLS_components.ElBadge, typeof __VLS_components.elBadge, ]} */ ;
// @ts-ignore
ElBadge;
// @ts-ignore
var __VLS_44 = __VLS_asFunctionalComponent(__VLS_43, new __VLS_43(__assign({ value: (4) }, { class: "badge-operation" })));
var __VLS_45 = __VLS_44.apply(void 0, __spreadArray([__assign({ value: (4) }, { class: "badge-operation" })], __VLS_functionalComponentArgsRest(__VLS_44), false));
var __VLS_41;
var __VLS_48 = {}.ElMenuItem;
/** @type {[typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, ]} */ ;
// @ts-ignore
ElMenuItem;
// @ts-ignore
var __VLS_49 = __VLS_asFunctionalComponent(__VLS_48, new __VLS_48({
    index: "read",
}));
var __VLS_50 = __VLS_49.apply(void 0, __spreadArray([{
        index: "read",
    }], __VLS_functionalComponentArgsRest(__VLS_49), false));
var __VLS_52 = __VLS_51.slots.default;
var __VLS_51;
var __VLS_53 = {}.ElMenuItem;
/** @type {[typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, typeof __VLS_components.ElMenuItem, typeof __VLS_components.elMenuItem, ]} */ ;
// @ts-ignore
ElMenuItem;
// @ts-ignore
var __VLS_54 = __VLS_asFunctionalComponent(__VLS_53, new __VLS_53({
    index: "deleted",
}));
var __VLS_55 = __VLS_54.apply(void 0, __spreadArray([{
        index: "deleted",
    }], __VLS_functionalComponentArgsRest(__VLS_54), false));
var __VLS_57 = __VLS_56.slots.default;
var __VLS_56;
var __VLS_3;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "content" }));
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "content-header" }));
__VLS_asFunctionalElement(__VLS_elements.h2, __VLS_elements.h2)({});
var __VLS_58 = {}.ElButton;
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
// @ts-ignore
ElButton;
// @ts-ignore
var __VLS_59 = __VLS_asFunctionalComponent(__VLS_58, new __VLS_58(__assign(__assign({ 'onClick': {} }, { icon: "Refresh", size: "small" }), { class: "refresh-btn" })));
var __VLS_60 = __VLS_59.apply(void 0, __spreadArray([__assign(__assign({ 'onClick': {} }, { icon: "Refresh", size: "small" }), { class: "refresh-btn" })], __VLS_functionalComponentArgsRest(__VLS_59), false));
var __VLS_62;
var __VLS_63;
var __VLS_64 = ({ click: {} },
    { onClick: (__VLS_ctx.handleRefresh) });
// @ts-ignore
[handleRefresh,];
var __VLS_61;
var __VLS_66 = {}.ElTable;
/** @type {[typeof __VLS_components.ElTable, typeof __VLS_components.elTable, typeof __VLS_components.ElTable, typeof __VLS_components.elTable, ]} */ ;
// @ts-ignore
ElTable;
// @ts-ignore
var __VLS_67 = __VLS_asFunctionalComponent(__VLS_66, new __VLS_66(__assign(__assign({ 'onSelectionChange': {} }, { data: (__VLS_ctx.messageList), border: true, stripe: true }), { style: {} })));
var __VLS_68 = __VLS_67.apply(void 0, __spreadArray([__assign(__assign({ 'onSelectionChange': {} }, { data: (__VLS_ctx.messageList), border: true, stripe: true }), { style: {} })], __VLS_functionalComponentArgsRest(__VLS_67), false));
var __VLS_70;
var __VLS_71;
var __VLS_72 = ({ selectionChange: {} },
    { onSelectionChange: (__VLS_ctx.handleSelectionChange) });
var __VLS_73 = __VLS_69.slots.default;
// @ts-ignore
[messageList, handleSelectionChange,];
var __VLS_74 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_75 = __VLS_asFunctionalComponent(__VLS_74, new __VLS_74({
    type: "selection",
    width: "50",
}));
var __VLS_76 = __VLS_75.apply(void 0, __spreadArray([{
        type: "selection",
        width: "50",
    }], __VLS_functionalComponentArgsRest(__VLS_75), false));
var __VLS_79 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_80 = __VLS_asFunctionalComponent(__VLS_79, new __VLS_79({
    label: "通知标题",
    prop: "title",
    width: "200",
}));
var __VLS_81 = __VLS_80.apply(void 0, __spreadArray([{
        label: "通知标题",
        prop: "title",
        width: "200",
    }], __VLS_functionalComponentArgsRest(__VLS_80), false));
var __VLS_84 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_85 = __VLS_asFunctionalComponent(__VLS_84, new __VLS_84({
    label: "标签",
    width: "120",
}));
var __VLS_86 = __VLS_85.apply(void 0, __spreadArray([{
        label: "标签",
        width: "120",
    }], __VLS_functionalComponentArgsRest(__VLS_85), false));
var __VLS_88 = __VLS_87.slots.default;
{
    var __VLS_89 = __VLS_87.slots.default;
    var scope = __VLS_getSlotParameters(__VLS_89)[0];
    var __VLS_90 = {}.ElTag;
    /** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
    // @ts-ignore
    ElTag;
    // @ts-ignore
    var __VLS_91 = __VLS_asFunctionalComponent(__VLS_90, new __VLS_90({
        type: (scope.row.tagType === 'afternoon' ? 'warning' : 'danger'),
        size: "small",
    }));
    var __VLS_92 = __VLS_91.apply(void 0, __spreadArray([{
            type: (scope.row.tagType === 'afternoon' ? 'warning' : 'danger'),
            size: "small",
        }], __VLS_functionalComponentArgsRest(__VLS_91), false));
    var __VLS_94 = __VLS_93.slots.default;
    (scope.row.tagText);
    var __VLS_93;
}
var __VLS_87;
var __VLS_95 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_96 = __VLS_asFunctionalComponent(__VLS_95, new __VLS_95({
    label: "通知内容",
    prop: "content",
}));
var __VLS_97 = __VLS_96.apply(void 0, __spreadArray([{
        label: "通知内容",
        prop: "content",
    }], __VLS_functionalComponentArgsRest(__VLS_96), false));
var __VLS_100 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_101 = __VLS_asFunctionalComponent(__VLS_100, new __VLS_100({
    label: "附件",
    width: "60",
}));
var __VLS_102 = __VLS_101.apply(void 0, __spreadArray([{
        label: "附件",
        width: "60",
    }], __VLS_functionalComponentArgsRest(__VLS_101), false));
var __VLS_104 = __VLS_103.slots.default;
{
    var __VLS_105 = __VLS_103.slots.default;
    var scope = __VLS_getSlotParameters(__VLS_105)[0];
    if (scope.row.hasAttachment) {
        var __VLS_106 = {}.ElIcon;
        /** @type {[typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, typeof __VLS_components.ElIcon, typeof __VLS_components.elIcon, ]} */ ;
        // @ts-ignore
        ElIcon;
        // @ts-ignore
        var __VLS_107 = __VLS_asFunctionalComponent(__VLS_106, new __VLS_106(__assign({ class: "attachment-icon" })));
        var __VLS_108 = __VLS_107.apply(void 0, __spreadArray([__assign({ class: "attachment-icon" })], __VLS_functionalComponentArgsRest(__VLS_107), false));
        var __VLS_110 = __VLS_109.slots.default;
        var __VLS_111 = {}.Document;
        /** @type {[typeof __VLS_components.Document, ]} */ ;
        // @ts-ignore
        icons_vue_1.Document;
        // @ts-ignore
        var __VLS_112 = __VLS_asFunctionalComponent(__VLS_111, new __VLS_111({}));
        var __VLS_113 = __VLS_112.apply(void 0, __spreadArray([{}], __VLS_functionalComponentArgsRest(__VLS_112), false));
        var __VLS_109;
    }
}
var __VLS_103;
var __VLS_116 = {}.ElTableColumn;
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
// @ts-ignore
ElTableColumn;
// @ts-ignore
var __VLS_117 = __VLS_asFunctionalComponent(__VLS_116, new __VLS_116({
    label: "时间",
    prop: "time",
    width: "160",
}));
var __VLS_118 = __VLS_117.apply(void 0, __spreadArray([{
        label: "时间",
        prop: "time",
        width: "160",
    }], __VLS_functionalComponentArgsRest(__VLS_117), false));
var __VLS_69;
__VLS_asFunctionalElement(__VLS_elements.div, __VLS_elements.div)(__assign({ class: "pagination-container" }));
var __VLS_121 = {}.ElPagination;
/** @type {[typeof __VLS_components.ElPagination, typeof __VLS_components.elPagination, typeof __VLS_components.ElPagination, typeof __VLS_components.elPagination, ]} */ ;
// @ts-ignore
ElPagination;
// @ts-ignore
var __VLS_122 = __VLS_asFunctionalComponent(__VLS_121, new __VLS_121(__assign(__assign({ 'onSizeChange': {} }, { 'onCurrentChange': {} }), { currentPage: (__VLS_ctx.pagination.currentPage), pageSizes: ([10, 20, 50]), pageSize: (__VLS_ctx.pagination.pageSize), layout: "prev, pager, next", total: (__VLS_ctx.pagination.total) })));
var __VLS_123 = __VLS_122.apply(void 0, __spreadArray([__assign(__assign({ 'onSizeChange': {} }, { 'onCurrentChange': {} }), { currentPage: (__VLS_ctx.pagination.currentPage), pageSizes: ([10, 20, 50]), pageSize: (__VLS_ctx.pagination.pageSize), layout: "prev, pager, next", total: (__VLS_ctx.pagination.total) })], __VLS_functionalComponentArgsRest(__VLS_122), false));
var __VLS_125;
var __VLS_126;
var __VLS_127 = ({ sizeChange: {} },
    { onSizeChange: (__VLS_ctx.handleSizeChange) });
var __VLS_128 = ({ currentChange: {} },
    { onCurrentChange: (__VLS_ctx.handleCurrentChange) });
// @ts-ignore
[pagination, pagination, pagination, handleSizeChange, handleCurrentChange,];
var __VLS_124;
/** @type {__VLS_StyleScopedClasses['notification-page']} */ ;
/** @type {__VLS_StyleScopedClasses['container']} */ ;
/** @type {__VLS_StyleScopedClasses['sidebar']} */ ;
/** @type {__VLS_StyleScopedClasses['sidebar-title']} */ ;
/** @type {__VLS_StyleScopedClasses['notification-menu']} */ ;
/** @type {__VLS_StyleScopedClasses['badge-all']} */ ;
/** @type {__VLS_StyleScopedClasses['badge-system']} */ ;
/** @type {__VLS_StyleScopedClasses['badge-finance']} */ ;
/** @type {__VLS_StyleScopedClasses['badge-operation']} */ ;
/** @type {__VLS_StyleScopedClasses['content']} */ ;
/** @type {__VLS_StyleScopedClasses['content-header']} */ ;
/** @type {__VLS_StyleScopedClasses['refresh-btn']} */ ;
/** @type {__VLS_StyleScopedClasses['attachment-icon']} */ ;
/** @type {__VLS_StyleScopedClasses['pagination-container']} */ ;
var __VLS_export = (await Promise.resolve().then(function () { return require('vue'); })).defineComponent({});
exports.default = {};
